package com.example.kt_user.repo

import com.example.kt_common.base.BaseRepository
import com.example.kt_common.network.RespStateData
import com.example.kt_user.api.UserApi
import com.example.kt_user.bean.request.LoginReq

/**
 * Created by 小陈 on 2025/3/23.
 * Time: 18:23.
 */
class LoginRepo(private val api: UserApi) : BaseRepository() {


    suspend fun captcha(data: RespStateData<String>) = dealResp(
        block = { api.getCaptchaStr() }, data
    )

    suspend fun login(
        loginReq: LoginReq, data: RespStateData<String>
    ) = dealResp(
        block = { api.login(loginReq) }, data
    )


}